.class public Lcom/brixd/niceapp/model/BannerModel;
.super Ljava/lang/Object;
.source "BannerModel.java"

# interfaces
.implements Ljava/io/Serializable;


# instance fields
.field public actionType:I

.field public albumCoverUrl:Ljava/lang/String;

.field public articleId:I

.field public bannerId:I

.field public coverUrl:Ljava/lang/String;

.field public description:Ljava/lang/String;

.field public downloadUrl:Ljava/lang/String;

.field public iconUrl:Ljava/lang/String;

.field public linkUrl:Ljava/lang/String;

.field public minSdkVersion:I

.field public packageName:Ljava/lang/String;

.field public rgb:Ljava/lang/String;

.field public subTitle:Ljava/lang/String;

.field public title:Ljava/lang/String;

.field public videoIsPortrait:Z

.field public videoShareUrl:Ljava/lang/String;

.field public videoUrl:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 14
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static parseBannerModels(Lorg/json/JSONArray;)Ljava/util/List;
    .registers 7
    .param p0, "jsonArray"    # Lorg/json/JSONArray;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONArray;",
            ")",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/BannerModel;",
            ">;"
        }
    .end annotation

    .prologue
    .line 27
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 29
    .local v1, "bannerModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/BannerModel;>;"
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_6
    invoke-virtual {p0}, Lorg/json/JSONArray;->length()I

    move-result v4

    if-ge v2, v4, :cond_a5

    .line 30
    new-instance v0, Lcom/brixd/niceapp/model/BannerModel;

    invoke-direct {v0}, Lcom/brixd/niceapp/model/BannerModel;-><init>()V

    .line 31
    .local v0, "bannerModel":Lcom/brixd/niceapp/model/BannerModel;
    invoke-virtual {p0, v2}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v3

    .line 33
    .local v3, "jsonObject":Lorg/json/JSONObject;
    const-string v4, "action_type"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v0, Lcom/brixd/niceapp/model/BannerModel;->actionType:I

    .line 34
    const-string v4, "cover_image"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->coverUrl:Ljava/lang/String;

    .line 35
    const-string v4, "url"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->linkUrl:Ljava/lang/String;

    .line 36
    const-string v4, "id"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v0, Lcom/brixd/niceapp/model/BannerModel;->bannerId:I

    .line 37
    const-string v4, "articleId"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v0, Lcom/brixd/niceapp/model/BannerModel;->articleId:I

    .line 38
    const-string v4, "digest"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->description:Ljava/lang/String;

    .line 39
    const-string v4, "title"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->title:Ljava/lang/String;

    .line 40
    const-string v4, "sub_title"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->subTitle:Ljava/lang/String;

    .line 41
    const-string v4, "album_cover_image"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->albumCoverUrl:Ljava/lang/String;

    .line 42
    const-string v4, "rgb"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->rgb:Ljava/lang/String;

    .line 43
    const-string v4, "package_name"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->packageName:Ljava/lang/String;

    .line 44
    const-string v4, "min_sdk_version"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v4

    iput v4, v0, Lcom/brixd/niceapp/model/BannerModel;->minSdkVersion:I

    .line 45
    const-string v4, "icon_image"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->iconUrl:Ljava/lang/String;

    .line 46
    const-string v4, "download_url"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->downloadUrl:Ljava/lang/String;

    .line 47
    const-string v4, "video_is_portrait"

    const/4 v5, 0x0

    invoke-virtual {v3, v4, v5}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z

    move-result v4

    iput-boolean v4, v0, Lcom/brixd/niceapp/model/BannerModel;->videoIsPortrait:Z

    .line 48
    const-string v4, "video_url"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->videoUrl:Ljava/lang/String;

    .line 49
    const-string v4, "video_share_url"

    invoke-virtual {v3, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v0, Lcom/brixd/niceapp/model/BannerModel;->videoShareUrl:Ljava/lang/String;

    .line 51
    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 29
    add-int/lit8 v2, v2, 0x1

    goto/16 :goto_6

    .line 54
    .end local v0    # "bannerModel":Lcom/brixd/niceapp/model/BannerModel;
    .end local v3    # "jsonObject":Lorg/json/JSONObject;
    :cond_a5
    return-object v1
.end method
